package bsplib;

import bsplib.Vec3f;

class BspPlane
{
    public var normal : Vec3f;
    public var dist : Float;
    
    public function new( _normal : Vec3f, _dist : Float )
    {
        normal = _normal;
        dist = _dist;
    }
    
    public function clone() : BspPlane {
        return new BspPlane( normal.clone(), dist );
    }

    public function invert() : Void {
        normal.negate();
        dist = -dist;
    }
    
    public function inverted() : BspPlane {
        return new BspPlane( new Vec3f( -normal.x, -normal.y, -normal.z ), -dist );
    }
}
